package Utils

import redis.clients.jedis.{JedisPool, JedisPoolConfig}
object JPools {

  private val jedisPoolConfig = new JedisPoolConfig()
  jedisPoolConfig.setMaxTotal(2000)
  jedisPoolConfig.setMaxIdle(1000)
  jedisPoolConfig.setTestOnBorrow(true)
  jedisPoolConfig.setTestOnReturn(true)

  private val jedisPool = new JedisPool(jedisPoolConfig, "host")

  def getJedis = jedisPool.getResource
}
